<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no" />
		<title></title>
		<style type="text/css">
			*{
				margin: 0px;
				padding: 0px;
			}
			html,
			body{
				height: 100%;
				overflow: hidden;
			}
			.wrap{
				height: 100%;
				background-color: gray;
			}
			.wrap > .inner{
				text-align: center;
				position: absolute;
				left: 50%;
				top: 50%;
				transform: translate3d(-50%, -50%, 0);
				white-space: nowrap;
			}
			.wrap > .inner > span{
				position: relative;
				/* animation: move 1s linear infinite alternate; */
			}
			@keyframes move{
				from{
					top: 0px;
				}
				to{
					top: -10px;
				}
			}
		</style>
	</head>
	<body>
		<div class="wrap">
			<div class="inner">
				<span>几</span>
				<span>百</span>
				<span>斤</span>
				<span>了</span>
				<span>还</span>
				<span>装</span>
				<span>可</span>
				<span>爱</span>
			</div>
		</div>
	</body>
	<script type="text/javascript">
		window.onload = function () {
			var spanNodes = document.querySelectorAll(".wrap > .inner > span");
			var colors = ["red", "orange", "yellow", "green", "blue", "pink", "deeppink","red", "orange", "yellow"];
			for (var i = 0; i < spanNodes.length; i++) {
				spanNodes[i].style.animation = "move 0.3s " + (i * 50) + "ms linear infinite alternate";
				spanNodes[i].style.color = colors[i];
			}
		}
	</script>
</html>
